<script>
	
	$(document).ready(function(e) {
		var page=1;
		$('#btnComment').click(function(e) {
            search();
			
        });
        function search()
		{
			$('#ajaxcomment').append('<p id="loading" style="text-align:center"><img src="<?php echo $url_dir; ?>images/loading.gif"></p>');
			$.post('<?php echo $url; ?>getComment.php?n='+page,$('#frmComment').serialize(),function(data){
				$('#ajaxcomment').find('#loading').remove();
				if(!$.trim(data)){
					
				}
				else{
					$('#ajaxcomment').html(data);
				}
				
			});
		}
    });
</script>
 <section class="comment">
    <header><h3>NHẬN XÉT</h3></header>
    <form  method="post" action="" id="frmComment" name="frmComment">
        <div>
            <input 
                name="data[fullname]"
                class="formBox" 
                placeholder="Tên của bạn" 
                type="text">
            <input 
                name="data[email]"
                class="formBox" 
                placeholder="E-mail"  
                type="text">
        </div>
        <div>
            <textarea 
                name="data[content]"
                class="formBox formBox-1" 
                placeholder="Nội dung bình luận"></textarea>
        </div>
        <div>
            <input class="blueBtn" value="GỬI NHẬN XÉT" type="button" id="btnComment" name="btnComment">
        </div>
    </form>
     <footer id="ajaxcomment">
         <ul>
          <?php
              require('getComment.php');
          ?>
            
         </ul>
     </footer>
</section><!--end .comment-->
